package com.syh.bjdataservice.controller;


import com.syh.bjdataservice.service.IBjDataService;
import com.syh.bscommon.pojo.Result;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author syh
 * @since 2024-07-01
 */
@Tag(name = "BjDataController", description = "北京数据模块")
@RestController
@RequestMapping("/bj-data")
@RequiredArgsConstructor
public class BjDataController {
    private final IBjDataService bjDataService;
    @GetMapping("/get")
    @Operation(summary = "获取北京数据")
    public Result getData() {
        return Result.success(bjDataService.getData());
    }
    @GetMapping("/getpie")
    @Operation(summary = "获取北京饼图数据")
    public Result getPie() {
        return Result.success(bjDataService.getPie());
    }
}
